package cn.lyjuan.android.demofive.ui.slide.section;

import android.support.annotation.NonNull;

import java.util.List;

/**
 * Created by chad on 03/11/2017.
 */

public class SectionBean implements Comparable<SectionBean>
{
    private String header;

    private List<SectionItem> items;

    @Override
    public int compareTo(@NonNull SectionBean o)
    {
        return this.header.compareTo(o.header);
    }

    public static class SectionItem implements Comparable<SectionItem>
    {
        /**
         * 内容
         */
        private String content;

        /**
         * 拼音
         */
        private String pinyin;

        /**
         * 拼音-简写
         */
        private String pinyinSimple;


        @Override
        public int compareTo(@NonNull SectionItem o)
        {
            return this.getPinyin().compareTo(o.pinyin);
        }

        public SectionItem(String content, String pinyin, String pinyinSimple)
        {
            this.content = content;
            this.pinyin = pinyin;
            this.pinyinSimple = pinyinSimple;
        }

        public String getContent()
        {
            return content;
        }

        public void setContent(String content)
        {
            this.content = content;
        }

        public String getPinyin()
        {
            return pinyin;
        }

        public void setPinyin(String pinyin)
        {
            this.pinyin = pinyin;
        }

        public String getPinyinSimple()
        {
            return pinyinSimple;
        }

        public void setPinyinSimple(String pinyinSimple)
        {
            this.pinyinSimple = pinyinSimple;
        }
    }

    public SectionBean()
    {
    }

    public SectionBean(String header, List<SectionItem> items)
    {
        this.header = header;
        this.items = items;
    }

    public SectionBean(String header)
    {
        this.header = header;
    }

    public List<SectionItem> getItems()
    {
        return items;
    }

    public void setItems(List<SectionItem> items)
    {
        this.items = items;
    }

    public String getHeader()
    {
        return header;
    }

    public void setHeader(String header)
    {
        this.header = header;
    }
}
